<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>#{departmentBean.labela}</title>
        <h:outputStylesheet library="css" name="styles.css"/> 
    </h:head>
    <h:body>
        <ui:include src="menuBar.xhtml"/>
        <h:form>
            <p:panel header="#{departmentBean.labela}" styleClass="headerPanel">
                <div class="departmentFrag">
                    <br/>
                    <p:fieldset legend="1. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(0)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" />
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="2. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(1)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" action="#{courseBean.getPredmetById(p.idPredmet)}"/>
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="3. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(2)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" action="#{courseBean.getPredmetById(p.idPredmet)}"/>
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="4. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(3)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" action="#{courseBean.getPredmetById(p.idPredmet)}"/>
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="5. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(4)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" action="#{courseBean.getPredmetById(p.idPredmet)}"/>
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="6. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(5)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" action="#{courseBean.getPredmetById(p.idPredmet)}"/>
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="7. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(6)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" action="#{courseBean.getPredmetById(p.idPredmet)}"/>
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="8. semestar" toggleable="true" toggleSpeed="500" collapsed="true">
                        <p:dataTable value="#{departmentBean.predmetList.get(7)}" var="p"
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15">
                            <p:column headerText="sifra" filterBy="sifra" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.sifra}"/>
                            </p:column>
                            <p:column headerText="Naziv" filterBy="naziv" filterMatchMode="contains" sortBy="sifra">
                                <h:outputLabel value="#{p.naziv}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Detalji" action="#{courseBean.getPredmetById(p.idPredmet)}"/>
                            </p:column>
                        </p:dataTable>
                    </p:fieldset>
                    
                </div>
            </p:panel>
        </h:form>
    </h:body>
</html>

